package com.csg.ses.dao.ses;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.csg.ses.entity.ses.SysRoleAccountsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 角色账户
 * @author wangjun
 * @date 2020/11/16
 */
@Mapper
public interface SysRoleAccountsDao extends BaseMapper<SysRoleAccountsEntity> {
    /**
	 * 自定义sql分页
	 * @param page
	 * @param qw
	 * @return
	 */
    IPage<SysRoleAccountsEntity> retrieve(IPage<SysRoleAccountsEntity> page, @Param(Constants.WRAPPER) Wrapper<SysRoleAccountsEntity> qw);

    Integer countByRoleIds(List<String> idList);

    Integer existsCount(String roleId, String loginId);
}